home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / misc / millim.lha / millim.doc next >
Encoding:
Text File  |  1993-04-21  |  4.5 KB  |  103 lines

  1.      The  file  "millim.ps"  contains  PostScript procedures that draw
  2. millimetered  paper with logarithmic or linear scales both on x and y;
  3. the user should write a PostScript program that calls these routines.
  4.  
  5.      To  do this, save millim.ps and edit a copy of that same file; go
  6. to  the end, and replace all the instructions between the lines saying
  7. "%%Page 1 1" and "%%Trailer".  Be careful:  THE CASE IS SIGNIFICANT in
  8. PostScript!
  9.  
  10. - The first line must be "init".
  11. - The  default  paper size is A4; if you are using Letter sized paper,
  12.   insert  here  a single line saying "letter"; if you are using custom
  13.   paper,  insert  here  two  lines  defining  the paper size, like the
  14.   following  examples  (obey to the case and the spacing!  You can use
  15.   as  units  inches,  centimeters or millimeters simply typing "in" or
  16.   "cm"  or  "mm";  if  no unit is given the default is a "point", i.e.
  17.   1/72th of an inch):
  18.  
  19.   /xsheet 8.5 in def
  20.   /ysheet 297 mm def
  21.   /xsheet 612 def
  22.  
  23.   ("xsheet"  and  "ysheet"  are  the  variable names holding the paper
  24.   size; these statements store into them the correct values).
  25. - The  default  page  orientation  is  portrait; if you need landscape
  26.   orientation, insert here a single line saying "landscape".
  27. - Then  insert  (optional) lines to modify the default values of every
  28.   constant  that  do not satisfy you needs; these constants with their
  29.   default values are:
  30.  
  31.   /margin     2 cm def
  32.   /fontsize   10   def
  33.   /bordersize 1    def
  34.   /linesize   0.4  def
  35.   /smallsize  0.01 def
  36.   /bordergray 0    def
  37.   /linegray   0    def
  38.   /smallgray  0    def
  39.  
  40.   and their meaning is the following:
  41. . "margin":   the  drawing is done in a rectangular region at "margin"
  42.   from  the  paper  borders.   be sure that the axis labels can fit in
  43.   "margin" (these labels are ALWAYS printed).
  44. . "fontsize"  is the height (in points) of the font (Times-Roman) used
  45.   to print the axis labels.
  46. . "bordersize",  "linesize" and "smallsize" are the width in points of
  47.   the  lines  used to draw the frame borders, the normal divisions and
  48.   the  small  subdivisions  (see later for the definitions of the last
  49.   two).
  50. . "bordergray",  "linegray"  and  "smallgray"  are  the gray levels of
  51.   these  same  lines:   they  must  be values from 0 to 1 inclusive, 0
  52.   meaning black and 1 meaning white (i.e.  not drawn).  Be careful: on
  53.   some printers "gray" lines are rendered as dotted lines;  or, "gray"
  54.   and very thin lines  could or could not be drawn  according to their
  55.   position on the page.
  56. - Then, define two arrays "xscale" and "yscale" in the following way:
  57.  
  58.   /xscale [-2 2]     def      OR
  59.   /xscale [0 1 10]   def      OR
  60.   /xscale [0 2 10 4] def
  61.  
  62.   (the  difference  between  these  three  variants  is  the number of
  63.   arguments inside the square brackets; the same works for yscale).
  64. . With  two  arguments, the x/y scale is logarithmic; and the argument
  65.   themselves  are  the  powers  of ten of the beginning and the end of
  66.   that scale:  [-2 2] means from 10^-2 to 10^2.
  67. . With  three  arguments,  the  scale  is  linear;  the first and last
  68.   arguments  are  the minimum and maximum value, and the middle one is
  69.   the  width  of  the  axis  intervals  where  a  label  and a "normal
  70.   division"  line  will be inserted:  [0 1 10] means from 0 to 10 with
  71.   labels and divisions every unit.
  72. . With  four  arguments, the scale is still linear; the meaning of the
  73.   first 3 arguments remains the same, and the fourth one is the number
  74.   of sub-intervals in every "normal division":  for every one of these
  75.   sub-interval,  a  line is drawn but no label is printed.  [0 2 10 4]
  76.   means:   lower value 0, higher value 10, label and normal line every
  77.   2 units, and each one of these "normal intervals" further divided in
  78.   4 intervals.
  79. - Then, insert a statement saying "drawsheet", to perform the drawing.
  80. - Then,  insert  a  statement saying "showpage", to print the drawing;
  81.   optionally,  if you are proficient in PostScript, you can overimpose
  82.   graphs on the drawing before the "showpage" command.
  83. - Print the file on a PostScript printer.
  84.  
  85. -----
  86.  
  87.      Enjoy!
  88.  
  89.      The  file millim.ps with its content is public domain, and can be
  90. spread and modified as you want.
  91.  
  92.      Comments  and  modifications  are  gladly  accepted  via EMail to
  93. loreti@padova.infn.it
  94.  
  95.                                                 MLO
  96.  
  97. Maurizio Loreti (MLO) - Ham: I3NOO
  98. Work:     University of Padova, Department of Physics
  99.           Via F. Marzolo, 8 - 35131 Padova - Italy
  100. DECnet:   VAXFPD::LORETI, i.e. 39330::LORETI
  101. BITNET:   LORETI@IPDINFN
  102. INTERNET: LORETI@PADOVA.INFN.IT
  103.